#include "headfiles.h"
#include <stdlib.h>

using namespace std;

int main(int argc, char **argv) {
    if (argc != 5) {
        cout << "Usage: " << argv[0] << "m n i j" << endl;
        return 0;
    }

    unsigned int m, n, i, j, res;
    m = (unsigned int)atoi(argv[1]);
    n = (unsigned int)atoi(argv[2]);
    i = (unsigned int)atoi(argv[3]);
    j = (unsigned int)atoi(argv[4]);

    res = replaceIntegerBits(n, m, i, j);

    printBits(m);
    printBits(n);
    printBits(res);

    return 0;
}

